package com.ruoyi.school.comment.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.school.comment.mapper.SchoolCommentMapper;
import com.ruoyi.school.comment.domain.SchoolComment;
import com.ruoyi.school.comment.service.ISchoolCommentService;
import com.ruoyi.common.core.text.Convert;

/**
 * 评论信息Service业务层处理
 * 
 * @author qiang
 * @date 2022-07-20
 */
@Service
public class SchoolCommentServiceImpl implements ISchoolCommentService 
{
    @Autowired
    private SchoolCommentMapper schoolCommentMapper;

    /**
     * 查询评论信息
     * 
     * @param id 评论信息主键
     * @return 评论信息
     */
    @Override
    public SchoolComment selectSchoolCommentById(Long id)
    {
        return schoolCommentMapper.selectSchoolCommentById(id);
    }

    /**
     * 查询评论信息列表
     * 
     * @param schoolComment 评论信息
     * @return 评论信息
     */
    @Override
    public List<SchoolComment> selectSchoolCommentList(SchoolComment schoolComment)
    {
        return schoolCommentMapper.selectSchoolCommentList(schoolComment);
    }

    /**
     * 新增评论信息
     * 
     * @param schoolComment 评论信息
     * @return 结果
     */
    @Override
    public int insertSchoolComment(SchoolComment schoolComment)
    {
        return schoolCommentMapper.insertSchoolComment(schoolComment);
    }

    /**
     * 修改评论信息
     * 
     * @param schoolComment 评论信息
     * @return 结果
     */
    @Override
    public int updateSchoolComment(SchoolComment schoolComment)
    {
        return schoolCommentMapper.updateSchoolComment(schoolComment);
    }

    /**
     * 批量删除评论信息
     * 
     * @param ids 需要删除的评论信息主键
     * @return 结果
     */
    @Override
    public int deleteSchoolCommentByIds(String ids)
    {
        return schoolCommentMapper.deleteSchoolCommentByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除评论信息信息
     * 
     * @param id 评论信息主键
     * @return 结果
     */
    @Override
    public int deleteSchoolCommentById(Long id)
    {
        return schoolCommentMapper.deleteSchoolCommentById(id);
    }
}
